<!-- 入库订单 -->
<template>
  <div class="page-container">
    <page_breadcrumb :getKeyMethod="init_table_model" @change="change_table_model" pageOption />



    <ex_super_table_page v-bind="option" ref="SuperTablePage" @selection-change="e => selection = e" >

    </ex_super_table_page>

  </div>
</template>
<script>
import superTablePageFunction from '@/mixin/super-table-page-function';
import emitOnFunction from '@/mixin/emit-on-function';

import page_table_model_manage from '@/mixin/page_table_model_manage';
let emitKey = 'globalExpress>order>manage'

export default {

  title: "title_global_express",
  mixins: [superTablePageFunction, emitOnFunction(emitKey), page_table_model_manage],
  components: {  },


  data() {
    return {
      selection: [],
     
      option: {
        search: {
          model: [
            { label: "label_order_code", key: "code", },
            { label: "label_platform", key: "platform", },
            { label: "label_platform_no", key: "platformCode", },
            { label: "label_track_code", key: "trackingNumber",fold: true,  },
  
            { label: "label_order_status", key: "status", type: 'select', enum: 'OmsGlobalExpressStatusEnum', fold: true, },
          ],
        },
        table: {
          url: "/oms-api/gem/GlobalExpressOrderRpc/selectList.json",
          model: this.init_table_model(),
        }
        ,

      },



    };
  },



  methods: {
    option_table_model() {
      return [
        // { type: 'selection', clickToggle: true, keyGroup: 'label_table_operate' },
        { key: 'code', label: 'label_order_code', 'min-width': 140, 'show-overflow-tooltip': true, },
        { key: 'platform', label: 'label_platform', 'width': 120, 'show-overflow-tooltip': true, },
        { key: 'platformCode', label: 'label_platform_no', 'width': 140, 'show-overflow-tooltip': true, },

        { key: 'isElectricity', label: 'label_is_electrify', 'width': 120, 'show-overflow-tooltip': true, formatter: (r, c, v, i) => this.$enumShow(v, "YesOrNoEnum") },

        { key: 'totalWeight', label: 'label_weight', 'width': 120, 'show-overflow-tooltip': true, },
        { key: 'measurementWeight', label: 'label_measure_weight', 'width': 120, 'show-overflow-tooltip': true, },

        { key: 'isAbnormal', label: 'label_is_abnormal', 'width': 120, 'show-overflow-tooltip': true, formatter: (r, c, v, i) => this.$enumShow(v, "YesOrNoEnum") },

        { key: 'originWarehouse', label: 'label_start_warehouse', 'width': 120, 'show-overflow-tooltip': true, },
        { key: 'transitWarehouse', label: 'label_transit_warehouse', 'width': 120, 'show-overflow-tooltip': true, },
        { key: 'destinationWarehouse', label: 'label_destination_warehouse', 'width': 120, 'show-overflow-tooltip': true, },

        { key: 'status', label: 'label_order_status', 'width': 120, 'show-overflow-tooltip': true, formatter: (r, c, v, i) => this.$enumShow(v, "OmsGlobalExpressStatusEnum") },

        {
          type: 'operate', width: 140, operate: [
            { label: 'label_view_detail', click: (row) => this.clickDetail(row) },
          ],
        },
      ]
    },



    clickDetail(row) {
      // let title = this.$tt('label_order_code') + row.receivingOrderCode
      // this.$refs['detail_order_inbound'].show({ params: { receivingId: row.id }, title })
    },
   
  }
};

</script>
<style></style>
